package com.qqtech.qquan.circle.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.qqtech.core.frame.dao.BaseDao;
import com.qqtech.qquan.circle.model.CircleInfo;
import com.qqtech.qquan.circle.model.CircleInfoQuery;
import com.qqtech.qquan.circle.model.CircleInfoVo;

public interface CircleInfoDao extends BaseDao<CircleInfo> {
	
	/**
	 * 增加点击量
	 * @param circleId
	 * @param pv
	 * @return
	 */
	int increasePv(int circleId, int pv);
	/**
	 * 增加-成员数量
	 * @param circleId
	 * @param memberCount
	 * @return
	 */
	int increaseMemberCount(int circleId, int memberCount);
	/**
	 * 减少-成员数量
	 * @param circleId
	 * @param memberCount
	 * @return
	 */
	int reduceMemberCount(int circleId, int memberCount);
	/**
	 * 增加-话题数量
	 * @param circleId
	 * @param topicCount
	 * @return
	 */
	int increaseTopicCount(int circleId, int topicCount);
	/**
	 * 减少-话题数量
	 * @param circleId
	 * @param topicCount
	 * @return
	 */	
	int reduceTopicCount(int circleId, int topicCount);
	Page<CircleInfoVo> queryListBaseInfo(CircleInfoQuery query, Pageable pageable);
	int queryCountBaseInfo(CircleInfoQuery query);
}
